import { Controller, Get, Post, Param, Headers } from '@nestjs/common';
import { GirlService } from './girl.service';

@Controller('girl')
export class GirlController {
  constructor(private girlService: GirlService) {}

  @Get()
  getGirl() {
    return this.girlService.getGirls();
  }

  @Post('/add')
  addGirl() {
    return this.girlService.addGirl();
  }

  @Get('/getGirlById/:id')
  getGirlById(@Param() params, @Headers() header) {
    console.log(header);

    const id: number = parseInt(params.id);
    return this.girlService.getGirlById(id);
  }
}
